﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenExpressApp.MetaAttribute;
using System.Reflection;

namespace OpenExpressApp.MetaModel
{
    public static class ExtensionMethods
    {
        /// <summary>
        /// 获取此类型的Editor类型名。
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static string MapToEditor(this Type type)
        {
            if (type.IsEnum)
            {
                return EditorNames.Enum;
            }
            else
            {
                return type.Name.ToLower();
            }
        }
    }
}